package com.jackson.javadesignmodel.FactoryAndStrategy;

/*
 * Author: JacksonCoder
 * FileName: Main
 * Version: 1.0.0
 * Date: 2025-09-22
 */

import com.jackson.javadesignmodel.FactoryAndStrategy.enums.UserType;
import com.jackson.javadesignmodel.FactoryAndStrategy.factory.DiscountStrategyFactory;
import com.jackson.javadesignmodel.FactoryAndStrategy.strategy.DiscountStrategy;

import java.math.BigDecimal;

public class Main {
    // 启动入口
    public static void main(String[] args) {
        BigDecimal order = BigDecimal.valueOf(100);
        DiscountStrategy strategy = DiscountStrategyFactory.getStrategy(UserType.SVIP);
        System.out.println("原价: " + order + "实付: " + strategy.apply(order));
    }

}
